﻿using System; 
using SiteUnity.Layers.Entity.General;
using SiteUnity.Layers.Entity.PageItems.Rates;
using SiteUnity.Layers.Core.Provider.PageItems; 

namespace SiteUnity.Layers.Application.Rates
{
    public class RateManager
    {
        static private RateProvider _ratingprovider = new RateProvider();

        static public decimal getRateAvarageByPage()
        {
            return getRateAvarageByPage(SiteManager.Website.CurrentPage);
        }

        static public decimal getRateAvarageByPage(Page page)
        {
            return _ratingprovider.selectRateAvarageByPage(page);
        }

        static public void insertRate(Page page,Rate starRate)
        {
            _ratingprovider.insertRate(page, starRate);
        }
    }
}
